<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0030)http://localhost:8080/House-2/ -->
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>云和租房 - 首页</TITLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<LINK rel=stylesheet type=text/css href="../css/style.css">
<META name=GENERATOR content="MSHTML 8.00.7601.17514"></HEAD>

  <script type="text/javascript" src="../jquery/jquery-1.8.3.js"></script>
<script>
function checkHouse(page){
	
	$(function(){
		$.ajax({	
			type : "POST",
			url: "getHouseByKeywords" ,
			data : {
				pageIndex : page,
				title : $("#title").val(),
				street : $("#street").val(),
				type : $("#type").val(),
				floorage : $("#floorage").val(),
				price : $("#price").val(),
			},
			success : function(data){
				var total="";
				$.each(data.house,function(i,val){
					total+="<table class='house-list'><tr><td class='house-thumb'><span><a href='#' target='_blank'><img src='../images/thumb_house.gif' width='100' height='75'></a></span><td></td><td><a href='#' target='_blank'>"+val.title+"</a>"+val.street_id.district_id.dname+val.street_id.sname+","+val.floorAge+"平米<br>联系方式："+val.contact+"</td><td class='house-type'>"+val.type_id.tname+"</td><td class='house-price'><span>"+val.price+"</span>元/月</td></tr></table>";
				});
				$("#listDiv").html(total);
				$("#lastPage").attr("onclick","checkHouse("+(data.currPage-1)+")");
				$("#nextPage").attr("onclick","checkHouse("+(data.currPage+1)+")");
				$("#totalPage").html(data.totalPage);
				$("#pageIndex").html(data.currPage);
			}
		});
			
		
	});
}

function doSearch(){
	checkHouse("1");
}
      

</script>



<BODY onload="checkHouse(1)">
<DIV id=header class=wrap>
<DIV id=logo><IMG src="../images/logo.gif"></DIV></DIV>
<DIV id=navbar class=wrap>
<DL class="search clearfix">
  <FORM id=sform method=post action=search.action>
  <DT>
  <UL>
    <LI class=bold>房屋信息</LI>
    <LI>标题：<INPUT class=text type=text name=title> <LABEL class=ui-blue><INPUT onclick="checkHouse(1)" value=搜索房屋 type=button name=search></LABEL> 
    </LI></UL></DT>
  <DD>
  <UL>
    <LI class=first>价格 </LI>
    <LI><SELECT name="price" id="price"> 
	                           <option selected value="">不限</option>
								<option value="0-20000">20000以下</option>
								<option value="20000-40000">20000-40000</option>
								<option value="40000-10000000">40000以上</option>
    </SELECT> </LI></UL></DD>
  <DD>
  <UL>
    <LI class=first>房屋位置</LI>
    <LI>
    <SELECT id=street name="street_id" id="street"> 
                                <option selected value="">不限</option>
								<option value="东海淀区">东海淀区</option>
								<option value="北海淀区">北海淀区</option>
								<option value="南海淀区">南海淀区</option>
								<option value="西海淀区">西海淀区</option>
      </SELECT> </LI></UL></DD>
  <DD>
  <UL>
    <LI class=first>房型</LI>
    <LI><SELECT name=type_id> 
                                <option selected value="">不限</option>
								<option value="一室一厅">一室一厅</option>
								<option value="两室一厅">两室一厅</option>
								<option value="三室一厅">三室一厅</option>
								
      </SELECT> 
  </LI></UL></DD>
  <DD>
  <UL>
    <LI class=first>面积 </LI>
    <LI><SELECT name=floorage> 
                                <option selected value="">不限</option>
								<option value="0-200">200m²以下</option>
								<option value="200-400">200m²-400m²</option>
								<option value="400-10000">400m²以上</option>
      </SELECT> </LI></UL></DD></FORM></DL></DIV>
<DIV class="main wrap">

<div id="listDiv">
			
		</div>

<!-- <TABLE class=house-list>
  <TBODY>
  
  <TR>
    <TD class=house-thumb><span><A href="details.htm" target="_blank"><img src="../images/thumb_house.gif" width="100" height="75" alt=""></a></span></TD>
    <TD>
      <DL>
        <DT><A href="details.htm" target="_blank">尽快回家</A></DT>
        <DD>海淀区中关村大街,346平米<BR>联系方式：3456 </DD></DL></TD>
    <TD class=house-type>一室一厅</TD>
    <TD class=house-price><SPAN>346.0</SPAN>元/月</TD>
    </TR>
 
  <TR class=odd>
    <TD class=house-thumb><span><A href="details.htm" target="_blank"><img src="../images/thumb_house.gif" width="100" height="75" alt=""></a></span></TD>
    <TD>
      <DL>
        <DT><A href="details.htm" target="_blank">大房子</A></DT>
        <DD>海淀区中关村大街,100平米<BR>联系方式：123456789 </DD></DL></TD>
    <TD class=house-type>一室一厅</TD>
    <TD class=house-price><SPAN>230.0</SPAN>元/月</TD>
    </TR>
  
  <TR>
    <TD class=house-thumb><span><A href="details.htm" target="_blank"><img src="../images/thumb_house.gif" width="100" height="75" alt=""></a></span></TD>
    <TD>
      <DL>
        <DT><A href="details.htm" target="_blank">123</A></DT>
        <DD>海淀区中关村大街,123平米<BR>联系方式：123 </DD></DL></TD>
    <TD class=house-type>一室一厅</TD>
    <TD class=house-price><SPAN>123.0</SPAN>元/月</TD>
    </TR>
  
  <TR class=odd>
    <TD class=house-thumb><span><A href="details.htm" target="_blank"><img src="../images/thumb_house.gif" width="100" height="75" alt=""></a></span></TD>
    <TD>
      <DL>
        <DT><A href="details.htm" target="_blank">jjjj</A></DT>
        <DD>海淀区中关村大街,123平米<BR>联系方式：ff </DD></DL></TD>
    <TD class=house-type>一室一厅</TD>
    <TD class=house-price><SPAN>123.0</SPAN>元/月</TD>
    </TR>
  
  <TR>无租房信息</TR></TBODY></TABLE> -->
<DIV class=pager>
              <ul>
				<li class=current><a href="#" onclick="checkHouse('1')">首页</a></li>
				<li><a href="#" id="lastPage" onclick="checkHouse()">上一页</a></li>
				<li><a href="#" id="nextPage" onclick="checkHouse()">下一页</a></li>
				<li><a href="#" onclick="checkHouse('100000')">末页</a></li>
			</ul>
 <!--  <SPAN 
class=total>1/2页</SPAN> --> 
</DIV></DIV>
<DIV id=footer class=wrap>
<DL>
  <DT>云和租房 © 2010 云和 京ICP证1000001号</DT>
  <DD>关于我们 · 联系方式 · 意见反馈 · 帮助中心</DD></DL></DIV></BODY></HTML>
    